<template>
    <i v-if="!svg" :class="'zx-icon-' + name" />
    <svg v-else class="zx-icon--svg" aria-hidden="true">
        <use :xlink:href="'#icon'+name" />
    </svg>
</template>

<script>
import './iconfont';

export default {
    name: 'ZxIcon',
    props: {
        name: String,

        svg: {
            type: Boolean,
            default: false,
        },
    },
};
</script>
